//
// C++ Interface: wormholetrayicon
//
// Description: 
//
//
// Author:  <>, (C) 2008
//
// Copyright: See COPYING file that comes with this distribution
//
//
#ifndef SNAPSHOT_H
#define SNAPSHOT_H
#include <KUrl>
#include <QTime>
#include "wormhole_export.h"

/**
@author 
*/
class SnapshotSchedule;

class WORMHOLE_EXPORT Snapshot
{
public:
	Snapshot();
	
	~Snapshot();
	
	
	QString name() const
	{
		return m_name;
	}
	void setName(QString n) 
	{
		m_name=n;
	}
	
	QString backendname() const
	{
		return m_backendname;
	}
	void setBackendname(QString n) 
	{
		m_backendname=n;
	}

	KUrl basedir() const
	{
		return m_basedir;
	}
	void setBasedir(KUrl u)
	{
		m_basedir=u;
	}

	KUrl destdir() const
	{
		return m_destdir;
	}
	void setDestdir(KUrl u)
	{
		m_destdir=u;
	}

	bool isScheduled() const
	{
		return m_scheduled;
	}
	
	SnapshotSchedule *snapshotschedule()
	{
		return m_snapshotschedule;
	}
	void setSnapshotschedule(SnapshotSchedule *s)
	{
	      m_snapshotschedule=s;
	}
private:
	QString m_name;
	QString m_backendname;
	KUrl m_basedir;
	KUrl m_destdir;
	bool m_scheduled;
	SnapshotSchedule *m_snapshotschedule;

private:
	void setScheduled(bool b)
	{
	      m_scheduled=b;
	}
};


class WORMHOLE_EXPORT SnapshotSchedule
{
public:
	enum Type{
		MINUTE, HOUR, DAY, WEEK, MONTH
	};

	SnapshotSchedule(enum Type e)
	{
	     m_type=e; 
	};
	
	~SnapshotSchedule();


	enum Type type() const
	{
		return m_type;
	}


	int count() const
	{
		return m_count;
	}
	void setCount(int c)
	{
		m_count=c;
	}

	
private:
	enum Type m_type;
	int m_count;
	//QTime time;
	
};
#endif //SNAPSHOT_H